@@ -289,7 +289,7 @@ func runGitCommandIn(dir string, arg ...string) error {
289
289
return cmd .Run ()
290
290
}
291
291
292
- func createGitRepository (debsrc , gopkg , orig string ) (string , error ) {
292
+ func createGitRepository (debsrc , gopkg , orig string , dep14 bool ) (string , error ) {
293
293
wd , err := os .Getwd ()
294
294
if err != nil {
295
295
return "" , err
@@ -303,8 +303,10 @@ func createGitRepository(debsrc, gopkg, orig string) (string, error) {
303
303
return dir , err
304
304
}
305
305
306
- if err := runGitCommandIn (dir , "checkout" , "-b" , "debian/sid" ); err != nil {
307
- return dir , err
306
+ if dep14 {
307
+ if err := runGitCommandIn (dir , "checkout" , "-b" , "debian/sid" ); err != nil {
308
+ return dir , err
309
+ }
308
310
}
309
311
310
312
if debianName := getDebianName (); debianName != "TODO" {
@@ -331,7 +333,12 @@ func createGitRepository(debsrc, gopkg, orig string) (string, error) {
331
333
return dir , err
332
334
}
333
335
334
- cmd := exec .Command ("gbp" , "import-orig" , "--debian-branch=debian/sid" , "--no-interactive" , filepath .Join (wd , orig ))
336
+ var cmd * exec.Cmd
337
+ if dep14 {
338
+ cmd = exec .Command ("gbp" , "import-orig" , "--debian-branch=debian/sid" , "--no-interactive" , filepath .Join (wd , orig ))
339
+ } else {
340
+ cmd = exec .Command ("gbp" , "import-orig" , "--no-interactive" , filepath .Join (wd , orig ))
341
+ }
335
342
cmd .Dir = dir
336
343
cmd .Stderr = os .Stderr
337
344
if err := cmd .Run (); err != nil {
@@ -745,7 +752,7 @@ func execMake(args []string, usage func()) {
745
752
746
753
debversion := u .version + "-1"
747
754
748
- dir , err := createGitRepository (debsrc , gopkg , orig )
755
+ dir , err := createGitRepository (debsrc , gopkg , orig , dep14 )
749
756
if err != nil {
750
757
log .Fatalf ("Could not create git repository: %v\n " , err )
751
758
}
0 commit comments