|
|
Created:
7 years, 7 months ago by haltonhuo Modified:
7 years, 7 months ago CC:
chromium-reviews Base URL:
https://chromium.googlesource.com/chromium/src.git@master Visibility:
Public. |
Descriptioninstall-build-deps: Install libudev1 for Ubuntu 13.04
Install libudev1 Ubuntu 13.04, keep libudev0 for other Ubuntu releases.
Add 13.04 (racing) codename
BUG=240963
TEST=Tested manually
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201259
Patch Set 1 #
Total comments: 1
Patch Set 2 : rewrite with Pawel's comment #
Total comments: 1
Patch Set 3 : use apt-cache instead of lsb_release #Messages
Total messages: 17 (0 generated)
hi, anybody could review it?
Thanks a lot for the patch. One small thing. https://codereview.chromium.org/14718016/diff/1/build/install-build-deps.sh File build/install-build-deps.sh (right): https://codereview.chromium.org/14718016/diff/1/build/install-build-deps.sh#n... build/install-build-deps.sh:131: # Some package names have changed over time Please add your logic here, to fit better with existing patterns.
> build/install-build-deps.sh:131: # Some package names have changed over time > Please add your logic here, to fit better with existing patterns. Done, please review set2
Please make sure to test on Raring after applying the fix. https://codereview.chromium.org/14718016/diff/5001/build/install-build-deps.sh File build/install-build-deps.sh (right): https://codereview.chromium.org/14718016/diff/5001/build/install-build-deps.s... build/install-build-deps.sh:143: if [ "$(lsb_release -s -r)" = "13.04" ]; then Well, this is fragile and won't work forward for Ubuntus more recent than 13.04. Maybe I didn't notice it before, but it should use apt-cache show approach like above, i.e. if libudev1 exists it should be used instead of libudev0.
On 2013/05/17 23:15:09, Paweł Hajdan Jr. wrote: > Please make sure to test on Raring after applying the fix. Yes, I did. > Maybe I didn't notice it before, but it should use apt-cache show approach like > above, i.e. if libudev1 exists it should be used instead of libudev0. Done on set3, please review.
LGTM, thanks for the patch!
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/halton.huo@intel.com/14718016/9001
Message was sent while issue was closed.
Change committed as 201259
Message was sent while issue was closed.
On 2013/05/21 08:26:45, I haz the power (commit-bot) wrote: > Change committed as 201259 This check (apt-cache show libudev1 >/dev/null 2>&1) doesn't work for 12.04(precise). Script tries to install libudev1 instead of libudev0. Could you please fix it?
Message was sent while issue was closed.
On 2013/05/21 17:38:59, haaawk wrote: > On 2013/05/21 08:26:45, I haz the power (commit-bot) wrote: > > Change committed as 201259 > > This check (apt-cache show libudev1 >/dev/null 2>&1) doesn't work for > 12.04(precise). Script tries to install libudev1 instead of libudev0. Could you > please fix it? Will do.
Message was sent while issue was closed.
Message was sent while issue was closed.
On 2013/05/21 17:38:59, haaawk wrote: > On 2013/05/21 08:26:45, I haz the power (commit-bot) wrote: > > Change committed as 201259 > > This check (apt-cache show libudev1 >/dev/null 2>&1) doesn't work for > 12.04(precise). Script tries to install libudev1 instead of libudev0. Could you > please fix it? haaawk, my 12.04 shows me libudev0 correctly. Do you have a repo contains libudev1? $ lsb_release -r Release: 12.04 $ if apt-cache show libudev1 > /dev/null 2>&1; then \ > echo "libudev1" > else > echo "libudev0" > fi libudev0
Message was sent while issue was closed.
On 2013/05/22 02:16:33, haltonhuo wrote: > On 2013/05/21 17:38:59, haaawk wrote: > > On 2013/05/21 08:26:45, I haz the power (commit-bot) wrote: > > > Change committed as 201259 > > > > This check (apt-cache show libudev1 >/dev/null 2>&1) doesn't work for > > 12.04(precise). Script tries to install libudev1 instead of libudev0. Could > you > > please fix it? > > haaawk, my 12.04 shows me libudev0 correctly. Do you have a repo contains > libudev1? > > $ lsb_release -r > Release: 12.04 > $ if apt-cache show libudev1 > /dev/null 2>&1; then \ > > echo "libudev1" > > else > > echo "libudev0" > > fi > libudev0 In my case, it's libudev1. When I run apt-cache show libudev1, I get: ~$apt-cache show libudev1 Package: libudev1 Status: deinstall ok config-files Multi-Arch: same Priority: important Section: libs Installed-Size: 112 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Architecture: amd64 Source: systemd Version: 198-0ubuntu11.1 Config-Version: 198-0ubuntu11.1 Depends: libc6 (>= 2.17) Pre-Depends: multiarch-support Description: libudev shared library This library provides access to udev device information. Homepage: http://www.freedesktop.org/wiki/Software/systemd Original-Maintainer: Tollef Fog Heen <tfheen@debian.org> ~$echo $? 0
Message was sent while issue was closed.
On 2013/05/22 08:41:56, haaawk wrote: > On 2013/05/22 02:16:33, haltonhuo wrote: > > On 2013/05/21 17:38:59, haaawk wrote: > > > On 2013/05/21 08:26:45, I haz the power (commit-bot) wrote: > > > > Change committed as 201259 > > > > > > This check (apt-cache show libudev1 >/dev/null 2>&1) doesn't work for > > > 12.04(precise). Script tries to install libudev1 instead of libudev0. Could > > you > > > please fix it? > > > > haaawk, my 12.04 shows me libudev0 correctly. Do you have a repo contains > > libudev1? > > > > $ lsb_release -r > > Release: 12.04 > > $ if apt-cache show libudev1 > /dev/null 2>&1; then \ > > > echo "libudev1" > > > else > > > echo "libudev0" > > > fi > > libudev0 > > In my case, it's libudev1. When I run apt-cache show libudev1, I get: > > ~$apt-cache show libudev1 > Package: libudev1 > Status: deinstall ok config-files > Multi-Arch: same > Priority: important > Section: libs > Installed-Size: 112 > Maintainer: Ubuntu Developers <mailto:ubuntu-devel-discuss@lists.ubuntu.com> > Architecture: amd64 > Source: systemd > Version: 198-0ubuntu11.1 > Config-Version: 198-0ubuntu11.1 > Depends: libc6 (>= 2.17) > Pre-Depends: multiarch-support > Description: libudev shared library > This library provides access to udev device information. > Homepage: http://www.freedesktop.org/wiki/Software/systemd > Original-Maintainer: Tollef Fog Heen <mailto:tfheen@debian.org> > > ~$echo $? > 0 When I purged libudev1 with sudo aptitude --purge-unused purge libudev1, I got: ~$apt-cache show libudev1 N: Can't select versions from package 'libudev1' as it is purely virtual N: No packages found ~$echo $? 0 Which is still bad :(.
Message was sent while issue was closed.
On 2013/05/22 08:46:02, haaawk wrote: > ~$apt-cache show libudev1 > N: Can't select versions from package 'libudev1' as it is purely virtual > N: No packages found > ~$echo $? > 0 > > Which is still bad :(. On my 12.04, it gives me different result: $ apt-cache show libudev1 N: Unable to locate package libudev1 E: No packages found $ echo $? 100 I guess it is because you ever add a repo with libudev1 there or manually install it via .deb. Could you try to clean up your apt cache?
Message was sent while issue was closed.
On 2013/05/22 09:39:47, haltonhuo wrote: > On 2013/05/22 08:46:02, haaawk wrote: > > ~$apt-cache show libudev1 > > N: Can't select versions from package 'libudev1' as it is purely virtual > > N: No packages found > > ~$echo $? > > 0 > > > > Which is still bad :(. > > On my 12.04, it gives me different result: > $ apt-cache show libudev1 > N: Unable to locate package libudev1 > E: No packages found > $ echo $? > 100 > > I guess it is because you ever add a repo with libudev1 there or manually > install it via .deb. Could you try to clean up your apt cache? Well, don't you think that having a repo with libudev1 added is a normal thing? This script shouldn't depend on such subtle thing. This script is clearly wrong in current version. It tries to install libudev1 instead of libudev0 on machines with version of ubunto lower than 13.04 and some additional repo added.
Message was sent while issue was closed.
On 2013/05/23 08:40:05, haaawk wrote: > Well, don't you think that having a repo with libudev1 added is a normal thing? Yes, it is normal. Again, I guess your failure case is because you ever install libudev1 via .deb or repo. That cause "apt-cache show libudev1" return 0. Is there any problem to install libudev1 on ubuntu 12.10/12.04? > This script shouldn't depend on such subtle thing. This script is clearly wrong > in current version. It tries to install libudev1 instead of libudev0 on machines > with version of ubunto lower than 13.04 and some additional repo added. My old patch set2 ever check the Ubuntu version rather than "apt-cache" logic. But if you looked at other pkgs that need changed over time like jpeg-dev/jpeg62-dev. They are use apt-cache way to determine. And I'm persuaded by Pawel Hajdan that apt-cache is better than hard code ubuntu versions. Your failure is general issue not specific to libudev1, but general issue for all other pkgs that need changed overtime. For instance, your default repo contains libjpeg62-dev, but you manually installed a pkg libjpeg-dev. Thus, libjpeg-dev will be used. In this case, if developer really want jpeg62-dev one, he has to cleanup the cache to allow this script choose it. If you do not agree "apt-cache" is better than hardcode with ubuntu version. That is another thing. Back to your case. It seems to you install a .deb and purge it. Or add a repo with libudev1 then remove that repo. But the cache keep tracking it and return 0. I think we have two ways to fix this senario: 1. Fix apt-cache, return non-zero if purely virtual package. 2. In this script, we track not only the return value but also the message. Which one do you prefer to go? If goes #2, it is a separate chromium build tool. |