Are there bug numbers for these? The change looks fine, I just don't know the rationale. Merge: approve John =:-> On Nov 4, 2011 6:05 PM, "Jelmer Vernooij" <email address hidden> wrote:
> Jelmer Vernooij has proposed merging lp:~jelmer/bzr-builder/misc-fixes > into lp:bzr-builder. > > Requested reviews: > bzr-builder developers (bzr-builder-devs) > > For more details, see: > https://code.launchpad.net/~jelmer/bzr-builder/misc-fixes/+merge/81345 > > Some misc fixes: > > * Provide a binary package in debian/control during various tests; newer > versions of dpkg-source insist on this > * When building 3.0 (quilt) packages, don't leave any delta with upstream > that's not in debian/patches, newer versions of dpkg-source break with this > * When using --allow-fallback-to-native, only convert the package to > native if there is no upstream tarball > > -- > https://code.launchpad.net/~jelmer/bzr-builder/misc-fixes/+merge/81345 > You are subscribed to branch lp:bzr-builder. > > === added file '.testr.conf' > --- .testr.conf 1970-01-01 00:00:00 +0000 > +++ .testr.conf 2011-11-04 23:04:23 +0000 > @@ -0,0 +1,4 @@ > +[DEFAULT] > +test_command=BZR_PLUGINS_AT=builder@`pwd` bzr selftest -s bp.builder > --subunit > +test_id_option=--load-list $IDFILE > +test_list_option=--list > > === modified file 'cmds.py' > --- cmds.py 2011-11-04 14:07:59 +0000 > +++ cmds.py 2011-11-04 23:04:23 +0000 > @@ -55,7 +55,6 @@ > > from bzrlib.plugins.builder.recipe import ( > BaseRecipeBranch, > - DebUpstreamVariable, > build_tree, > RecipeParser, > resolve_revisions, > @@ -333,12 +332,11 @@ > f.close() > > > -def force_native_format(working_tree_path): > +def force_native_format(working_tree_path, current_format): > """Make sure a package is a format that supports native packages. > > :param working_tree_path: Path to the package > """ > - current_format = get_source_format(working_tree_path) > if current_format == "3.0 (quilt)": > convert_3_0_quilt_to_native(working_tree_path) > elif current_format not in ("1.0", "3.0 (native)"): > @@ -675,7 +673,9 @@ > write_manifest_to_transport(manifest, base_branch, > possible_transports) > return 0 > - if package_version.debian_version is not None: > + current_format = get_source_format(package_dir) > + if (package_version.debian_version is not None or > + current_format == "3.0 (quilt)"): > # Non-native package > try: > extract_upstream_tarball(base_branch.branch, > package_name, > @@ -686,8 +686,8 @@ > "Unable to find the upstream source. Import it > " > "as tag %s or build with " > "--allow-fallback-to-native." % e.tag_name) > - if allow_fallback_to_native: > - force_native_format(package_dir) > + else: > + force_native_format(package_dir, current_format) > try: > build_source_package(package_dir, > tgz_check=not allow_fallback_to_native) > > === modified file 'tests/test_blackbox.py' > --- tests/test_blackbox.py 2011-10-23 18:12:06 +0000 > +++ tests/test_blackbox.py 2011-11-04 23:04:23 +0000 > @@ -218,7 +218,8 @@ > self.build_tree_contents([("source/debian/rules", > "#!/usr/bin/make -f\nclean:\n"), > ("source/debian/control", > - "Source: foo\nMaintainer: maint <email address hidden>\n")]) > + "Source: foo\nMaintainer: maint <email address hidden>\n\n" > + "Package: foo\nArchitecture: all\n")]) > source.add(["a", "debian/", "debian/rules", "debian/control"]) > revid = source.commit("one") > self.build_tree_contents([("test.recipe", "# bzr-builder format > 0.1 " > @@ -251,7 +252,8 @@ > self.build_tree_contents([("source/debian/rules", > "#!/usr/bin/make -f\nclean:\n"), > ("source/debian/control", > - "Source: foo\nMaintainer: maint <email address hidden>\n")]) > + "Source: foo\nMaintainer: maint <email address hidden>\n\n" > + "Package: foo\nArchitecture: all\n")]) > source.add(["a", "debian/", "debian/rules", "debian/control"]) > source.commit("one") > self.build_tree_contents([("test.recipe", "# bzr-builder format > 0.1 " > @@ -268,7 +270,8 @@ > self.build_tree_contents([("source/debian/rules", > "#!/usr/bin/make -f\nclean:\n"), > ("source/debian/control", > - "Source: foo\nMaintainer: maint <email address hidden>\n")]) > + "Source: foo\nMaintainer: maint <email address hidden>\n" > + "\nPackage: foo\nArchitecture: all\n")]) > source.add(["a", "debian/", "debian/rules", "debian/control"]) > source.commit("one") > self.build_tree_contents([("test.recipe", "# bzr-builder format > 0.1 " > @@ -321,7 +324,8 @@ > (os.path.join(path, "debian/rules"), > "#!/usr/bin/make -f\nclean:\n"), > (os.path.join(path, "debian/control"), > - "Source: package\nMaintainer: maint <email address hidden>\n"), > + "Source: package\nMaintainer: maint <email address hidden>\n\n" > + "Package: package\nArchitecture: all\n"), > (os.path.join(path, "debian/changelog"), > cl_contents) > ]) > @@ -507,10 +511,18 @@ > def test_cmd_dailydeb_with_pristine_orig_bz2_tarball(self): > self.requireFeature(PristineTarFeature) > self.make_simple_quilt_package() > - pristine_tar_sha1 = self.make_upstream_version("0.1", > - [("upstream/file", "content\n")], pristine_tar_format="bz2") > + pristine_tar_sha1 = self.make_upstream_version("0.1", [ > + ("upstream/file", "content\n"), > + ("upstream/a", "contents of source/a\n")], > + pristine_tar_format="bz2") > self.build_tree_contents([("test.recipe", "# bzr-builder format > 0.3 " > "deb-version 0.1-1\nsource\n")]) > + wt = workingtree.WorkingTree.open("source") > + self.build_tree([("source/upstream/")]) > + self.build_tree_contents([ > + ("source/upstream/file", "content\n"), > + ("source/upstream/a", "contents of source/a\n")]) > + wt.add(["upstream", "upstream/file", "upstream/a"]) > out, err = self.run_bzr("dailydeb -q test.recipe working", > retcode=0) > self.assertPathExists("working/package_0.1.orig.tar.bz2") > @@ -519,6 +531,32 @@ > osutils.sha_file_by_name("working/package_0.1.orig.tar.bz2"), > pristine_tar_sha1) > > + def > test_cmd_dailydeb_allow_fallback_to_native_with_orig_tarball(self): > + self.requireFeature(PristineTarFeature) > + self.make_simple_quilt_package() > + pristine_tar_sha1 = self.make_upstream_version("0.1", [ > + ("upstream/file", "content\n"), > + ("upstream/a", "contents of source/a\n")], > + pristine_tar_format="bz2") > + self.build_tree_contents([("test.recipe", "# bzr-builder format > 0.3 " > + "deb-version 0.1-1\nsource\n")]) > + wt = workingtree.WorkingTree.open("source") > + self.build_tree([("source/upstream/")]) > + self.build_tree_contents([ > + ("source/upstream/file", "content\n"), > + ("source/upstream/a", "contents of source/a\n")]) > + wt.add(["upstream", "upstream/file", "upstream/a"]) > + out, err = self.run_bzr( > + "dailydeb --allow-fallback-to-native -q test.recipe working", > + retcode=0) > + self.assertPathExists("working/package_0.1.orig.tar.bz2") > + self.assertPathExists("working/package_0.1-1.debian.tar.gz") > + self.assertEquals("3.0 (quilt)\n", > + open("source/debian/source/format", "r").read()) > + self.assertEquals( > + osutils.sha_file_by_name("working/package_0.1.orig.tar.bz2"), > + pristine_tar_sha1) > + > def test_cmd_dailydeb_force_native(self): > self.make_simple_quilt_package() > self.build_tree_contents([("test.recipe", "# bzr-builder format > 0.3 " > @@ -610,7 +648,7 @@ > source.commit("set source format") > > self.build_tree_contents([("test.recipe", "# bzr-builder format > 0.3 " > - "deb-version 1\nsource\n")]) > + "deb-version 1-1\nsource\n")]) > out, err = self.run_bzr( > "dailydeb --allow-fallback-to-native -q test.recipe working", > retcode=3) > self.assertEquals(err, "bzr: ERROR: Unknown source format 2.0\n") > > >
« Back to merge proposal
Are there bug numbers for these? The change looks fine, I just don't know
the rationale.
Merge: approve
John
=:->
On Nov 4, 2011 6:05 PM, "Jelmer Vernooij" <email address hidden> wrote:
> Jelmer Vernooij has proposed merging lp:~jelmer/bzr-builder/misc-fixes /code.launchpad .net/~jelmer/ bzr-builder/ misc-fixes/ +merge/ 81345 fallback- to-native, only convert the package to /code.launchpad .net/~jelmer/ bzr-builder/ misc-fixes/ +merge/ 81345 BZR_PLUGINS_ AT=builder@ `pwd` bzr selftest -s bp.builder option= --load- list $IDFILE option= --list plugins. builder. recipe import ( able, format( working_ tree_path) : format( working_ tree_path, current_format): format( working_ tree_path) 3_0_quilt_ to_native( working_ tree_path) to_transport( manifest, base_branch, transports) version. debian_ version is not None: format( package_ dir) version. debian_ version is not None or upstream_ tarball( base_branch. branch, fallback- to-native. " % e.tag_name) to_native: format( package_ dir) format( package_ dir, current_format) package( package_ dir, to_native) test_blackbox. py' blackbox. py 2011-10-23 18:12:06 +0000 blackbox. py 2011-11-04 23:04:23 +0000 tree_contents( [("source/ debian/ rules", debian/ control" , commit( "one") tree_contents( [("test. recipe" , "# bzr-builder format tree_contents( [("source/ debian/ rules", debian/ control" , commit( "one") tree_contents( [("test. recipe" , "# bzr-builder format tree_contents( [("source/ debian/ rules", debian/ control" , commit( "one") tree_contents( [("test. recipe" , "# bzr-builder format nMaintainer: maint <email address hidden>\n"), nMaintainer: maint <email address hidden>\n\n" nArchitecture: all\n"), changelog" ), dailydeb_ with_pristine_ orig_bz2_ tarball( self): ture(PristineTa rFeature) simple_ quilt_package( ) upstream_ version( "0.1", tar_format= "bz2") upstream_ version( "0.1", [ tar_format= "bz2") tree_contents( [("test. recipe" , "# bzr-builder format WorkingTree. open("source" ) tree([( "source/ upstream/ ")]) tree_contents( [ upstream/ file", "content\n"), upstream/ a", "contents of source/a\n")]) bzr("dailydeb -q test.recipe working", Exists( "working/ package_ 0.1.orig. tar.bz2" ) sha_file_ by_name( "working/ package_ 0.1.orig. tar.bz2" ), dailydeb_ allow_fallback_ to_native_ with_orig_ tarball( self): ture(PristineTa rFeature) simple_ quilt_package( ) upstream_ version( "0.1", [ tar_format= "bz2") tree_contents( [("test. recipe" , "# bzr-builder format WorkingTree. open("source" ) tree([( "source/ upstream/ ")]) tree_contents( [ upstream/ file", "content\n"), upstream/ a", "contents of source/a\n")]) fallback- to-native -q test.recipe working", Exists( "working/ package_ 0.1.orig. tar.bz2" ) Exists( "working/ package_ 0.1-1.debian. tar.gz" ) ls("3.0 (quilt)\n", debian/ source/ format" , "r").read()) sha_file_ by_name( "working/ package_ 0.1.orig. tar.bz2" ), dailydeb_ force_native( self): simple_ quilt_package( ) tree_contents( [("test. recipe" , "# bzr-builder format tree_contents( [("test. recipe" , "# bzr-builder format fallback- to-native -q test.recipe working", ls(err, "bzr: ERROR: Unknown source format 2.0\n")
> into lp:bzr-builder.
>
> Requested reviews:
> bzr-builder developers (bzr-builder-devs)
>
> For more details, see:
> https:/
>
> Some misc fixes:
>
> * Provide a binary package in debian/control during various tests; newer
> versions of dpkg-source insist on this
> * When building 3.0 (quilt) packages, don't leave any delta with upstream
> that's not in debian/patches, newer versions of dpkg-source break with this
> * When using --allow-
> native if there is no upstream tarball
>
> --
> https:/
> You are subscribed to branch lp:bzr-builder.
>
> === added file '.testr.conf'
> --- .testr.conf 1970-01-01 00:00:00 +0000
> +++ .testr.conf 2011-11-04 23:04:23 +0000
> @@ -0,0 +1,4 @@
> +[DEFAULT]
> +test_command=
> --subunit
> +test_id_
> +test_list_
>
> === modified file 'cmds.py'
> --- cmds.py 2011-11-04 14:07:59 +0000
> +++ cmds.py 2011-11-04 23:04:23 +0000
> @@ -55,7 +55,6 @@
>
> from bzrlib.
> BaseRecipeBranch,
> - DebUpstreamVari
> build_tree,
> RecipeParser,
> resolve_revisions,
> @@ -333,12 +332,11 @@
> f.close()
>
>
> -def force_native_
> +def force_native_
> """Make sure a package is a format that supports native packages.
>
> :param working_tree_path: Path to the package
> """
> - current_format = get_source_
> if current_format == "3.0 (quilt)":
> convert_
> elif current_format not in ("1.0", "3.0 (native)"):
> @@ -675,7 +673,9 @@
> write_manifest_
> possible_
> return 0
> - if package_
> + current_format = get_source_
> + if (package_
> + current_format == "3.0 (quilt)"):
> # Non-native package
> try:
> extract_
> package_name,
> @@ -686,8 +686,8 @@
> "Unable to find the upstream source. Import it
> "
> "as tag %s or build with "
> "--allow-
> - if allow_fallback_
> - force_native_
> + else:
> + force_native_
> try:
> build_source_
> tgz_check=not allow_fallback_
>
> === modified file 'tests/
> --- tests/test_
> +++ tests/test_
> @@ -218,7 +218,8 @@
> self.build_
> "#!/usr/bin/make -f\nclean:\n"),
> ("source/
> - "Source: foo\nMaintainer: maint <email address hidden>\n")])
> + "Source: foo\nMaintainer: maint <email address hidden>\n\n"
> + "Package: foo\nArchitecture: all\n")])
> source.add(["a", "debian/", "debian/rules", "debian/control"])
> revid = source.
> self.build_
> 0.1 "
> @@ -251,7 +252,8 @@
> self.build_
> "#!/usr/bin/make -f\nclean:\n"),
> ("source/
> - "Source: foo\nMaintainer: maint <email address hidden>\n")])
> + "Source: foo\nMaintainer: maint <email address hidden>\n\n"
> + "Package: foo\nArchitecture: all\n")])
> source.add(["a", "debian/", "debian/rules", "debian/control"])
> source.
> self.build_
> 0.1 "
> @@ -268,7 +270,8 @@
> self.build_
> "#!/usr/bin/make -f\nclean:\n"),
> ("source/
> - "Source: foo\nMaintainer: maint <email address hidden>\n")])
> + "Source: foo\nMaintainer: maint <email address hidden>\n"
> + "\nPackage: foo\nArchitecture: all\n")])
> source.add(["a", "debian/", "debian/rules", "debian/control"])
> source.
> self.build_
> 0.1 "
> @@ -321,7 +324,8 @@
> (os.path.join(path, "debian/rules"),
> "#!/usr/bin/make -f\nclean:\n"),
> (os.path.join(path, "debian/control"),
> - "Source: package\
> + "Source: package\
> + "Package: package\
> (os.path.join(path, "debian/
> cl_contents)
> ])
> @@ -507,10 +511,18 @@
> def test_cmd_
> self.requireFea
> self.make_
> - pristine_tar_sha1 = self.make_
> - [("upstream/file", "content\n")], pristine_
> + pristine_tar_sha1 = self.make_
> + ("upstream/file", "content\n"),
> + ("upstream/a", "contents of source/a\n")],
> + pristine_
> self.build_
> 0.3 "
> "deb-version 0.1-1\nsource\n")])
> + wt = workingtree.
> + self.build_
> + self.build_
> + ("source/
> + ("source/
> + wt.add(["upstream", "upstream/file", "upstream/a"])
> out, err = self.run_
> retcode=0)
> self.assertPath
> @@ -519,6 +531,32 @@
> osutils.
> pristine_tar_sha1)
>
> + def
> test_cmd_
> + self.requireFea
> + self.make_
> + pristine_tar_sha1 = self.make_
> + ("upstream/file", "content\n"),
> + ("upstream/a", "contents of source/a\n")],
> + pristine_
> + self.build_
> 0.3 "
> + "deb-version 0.1-1\nsource\n")])
> + wt = workingtree.
> + self.build_
> + self.build_
> + ("source/
> + ("source/
> + wt.add(["upstream", "upstream/file", "upstream/a"])
> + out, err = self.run_bzr(
> + "dailydeb --allow-
> + retcode=0)
> + self.assertPath
> + self.assertPath
> + self.assertEqua
> + open("source/
> + self.assertEquals(
> + osutils.
> + pristine_tar_sha1)
> +
> def test_cmd_
> self.make_
> self.build_
> 0.3 "
> @@ -610,7 +648,7 @@
> source.commit("set source format")
>
> self.build_
> 0.3 "
> - "deb-version 1\nsource\n")])
> + "deb-version 1-1\nsource\n")])
> out, err = self.run_bzr(
> "dailydeb --allow-
> retcode=3)
> self.assertEqua
>
>
>