app-arch/dpkg should create an origins file. dpkg-vendor --vendor "gentoo" will complain if that file isn't created: dpkg-vendor: error: vendor default doesn't exist in /etc/dpkg/origins/ internal error: dpkg-vendor failed (status: 2). Since dpkg doesn't come with this file, then it should be a gentoo specific file that is added when installing. Reproducible: Always
Created attachment 330626 [details] origins.gentoo gentoo dpkg origins file
Better example: dpkg-vendor --vendor "gentoo" --query Vendor
Created attachment 330628 [details, diff] dpkg-ebuild.patch
Sorry my example was wrong again. Try again: dpkg-vendor --query Vendor This reads the /etc/dpkg/origins/default file which is a symlink to another file.
Comment on attachment 330628 [details, diff] dpkg-ebuild.patch +insinto /etc/dpkg/origins +newins ${FILESDIR}/origins.gentoo gentoo
Created attachment 330648 [details] origins.debian dpkg should also add some other origins vendors in case that info needs to be queried.
Created attachment 330650 [details] origins.ubuntu
(In reply to comment #5) > Comment on attachment 330628 [details, diff] [details, diff] > dpkg-ebuild.patch > > +insinto /etc/dpkg/origins > +newins ${FILESDIR}/origins.gentoo gentoo The dosym is necessary from my patch to set the default vendor which in this case is gentoo.
Created attachment 330652 [details, diff] dpkg-ebuild.patch Adds additional origins files.
What is this actually needed for?
(In reply to comment #10) > What is this actually needed for? dpkg-vendor --query Vendor dpkg-vendor: error: vendor default doesn't exist in /etc/dpkg/origins/ It's needed for the dpkg-vendor program as you can see. Also other programs will call dpkg-vendor and it will error if there aren't origins files for some vendors. The default one should be set in the case the vendor flag isn't set. This is also documented in the dpkg-vendor manpage.
(In reply to comment #10) > What is this actually needed for? I'm not sure if this is a enhancement. I really think this is a bug because dpkg-vendor throws an error without these files.
(In reply to comment #11) > (In reply to comment #10) > > What is this actually needed for? > > dpkg-vendor --query Vendor > dpkg-vendor: error: vendor default doesn't exist in /etc/dpkg/origins/ > > It's needed for the dpkg-vendor program as you can see. Also other programs > will call dpkg-vendor and it will error if there aren't origins files for > some vendors. The default one should be set in the case the vendor flag > isn't set. This is also documented in the dpkg-vendor manpage. What programs call dpkg-vendor? None of the included executables/scripts do. I am trying to establish here in what way you want to use dpkg-*, other than to fix what you seem to think is an omission in the way we distribute dpkg. The man page you mention tells you that you can already "work around" the problem using the DEB_VENDOR variable if your third party app (which?) needs it. Also, deb-origin(5) tells you that "[t]he files in /etc/dpkg/origins can provide information about various vendors who are providing Debian packages." Gentoo Linux is very much not one of those vendors. So, what do you intend to use this for? Also, what is stopping you from providing these files in your local install to deal with whatever stops you from working around it using DEB_VENDOR?
(In reply to comment #13) > > What programs call dpkg-vendor? None of the included executables/scripts do. > I have lintian installed and it calls dpkg-vendor. > I am trying to establish here in what way you want to use dpkg-*, other than > to fix what you seem to think is an omission in the way we distribute dpkg. > The man page you mention tells you that you can already "work around" the > problem using the DEB_VENDOR variable if your third party app (which?) needs > it. Specifying DEB_VENDOR when calling lintian looks for whatever is available in /etc/dpkg/origins. lintian does not provide the origins information for dpkg-vendor. > > Also, deb-origin(5) tells you that "[t]he files in /etc/dpkg/origins can > provide information about various vendors who are providing Debian > packages." Gentoo Linux is very much not one of those vendors. I am fine with that. What if the default is set to debian then since it should always be available and it is the source of all debian variants? > > So, what do you intend to use this for? Also, what is stopping you from > providing these files in your local install to deal with whatever stops you > from working around it using DEB_VENDOR? I intend to use this in conjunction with lintian. Nothing is stopping me from adding these files in a local install which I have already done but only after spending some time figuring out how lintian gets this information. It could have been easier on me as the user and other users who may not understand the underlying behavior of how this works if these files (at least the debian and ubuntu ones) were already provided. Ubuntu provides these origins files in a package called base-files as well as Debian. Each of these distros has its own version of the package (http://packages.ubuntu.com/raring/base-files and http://packages.debian.org/source/unstable/base-files). When you install dpkg on these distros, it has a runtime dependency on base-files. So if dpkg is to be properly installed on Gentoo with all its runtime dependencies, you should either provide these files when installing dpkg or create a new base-files ebuild which installs at least the ubuntu version of base-files which contains both the debian and ubuntu origins files to satisfy all of the runtime dependencies of dpkg.
Created attachment 330744 [details, diff] dpkg-ebuild.patch Modified ebuild patch to default to debian due to previous comments about Gentoo not being a vendor for debian packages. This patch is an option of satisfying a missing runtime dependency to the origins files in the debian distro-based base-files packages.
Comment on attachment 330648 [details] origins.debian dpkg-1.16.9/scripts/t/origins/debian
Comment on attachment 330650 [details] origins.ubuntu dpkg-1.16.9/scripts/t/origins/ubuntu
Let's implement this when a user of those files hits the portage tree. Also, it would probably not be a good idea to set a default (what would it be) as it doesn't seem right to blame some non-Gentoo default for whatever you package up and distribute, so maybe we should install no "debian" or "ubuntu" or indeed "gentoo" file but a "dummy" with dummy values.
(In reply to comment #18) > Let's implement this when a user of those files hits the portage tree. Not sure what you mean here. > Also, it would probably not be a good idea to set a default (what would it be) > as it doesn't seem right to blame some non-Gentoo default for whatever you > package up and distribute, I'm fine with no default. Currently, when I run lintian, I specify the distro I want it to package for: DEB_VENDOR="ubuntu" lintian foo.deb > so maybe we should install no "debian" or > "ubuntu" or indeed "gentoo" file but a "dummy" with dummy values. What would a dummy file accomplish? I need the origin definition files for ubuntu or debian so I have the distro information to target when running lintian.
Any status on when this change can be made? I see dpkg has already been bumped to 1.16.10 without this change.
I already explained the problems I see with this. The fix to your problem is to maintain your own /etc.
(In reply to comment #21) > I already explained the problems I see with this. The fix to your problem is > to maintain your own /etc. I don't understand. You mentioned that there shouldn't be a default but why not add the Debian and Ubuntu origin files as part of the package instead of making the user look around to find the proper format for these files?