rpms/gnome-packagekit/devel system-install-packages, NONE, 1.1 gnome-packagekit.spec, 1.21, 1.22

Owen Taylor (otaylor) fedora-extras-commits at redhat.com
Fri Apr 11 16:25:40 UTC 2008


Author: otaylor

Update of /cvs/extras/rpms/gnome-packagekit/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13163

Modified Files:
	gnome-packagekit.spec 
Added Files:
	system-install-packages 
Log Message:
* Thu Apr 10 2008 Owen Taylor <otaylor at redhat.com> - 0.1.11-4
- Make system-install-packages a wrapper script not a symlink
  so both files and package names work (#441674)



--- NEW FILE system-install-packages ---
#!/usr/bin/python

import os
import sys

have_local = False
have_remote = False

specified = []
for arg in sys.argv[1:]:
    if arg.startswith('-'):
        continue
    if os.path.exists(arg):
        have_local = True
    else:
        have_remote = True
    specified.append(arg)

if have_local and have_remote:
    import gtk

    d = gtk.MessageDialog(None, type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK,
                          message_format="Failed to install packages")
    secondary = "Mixing package names and files is not supported:"
    for name in specified:
        secondary += "\n   " + name
    d.format_secondary_text(secondary)
    d.run()
    sys.exit(1)

if have_local:
    os.execv("/usr/bin/gpk-install-file", ["gpk-install-file"] + specified)
else:
    os.execv("/usr/bin/gpk-install-package", ["gpk-install-file"] + specified)


Index: gnome-packagekit.spec
===================================================================
RCS file: /cvs/extras/rpms/gnome-packagekit/devel/gnome-packagekit.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- gnome-packagekit.spec	9 Apr 2008 18:06:58 -0000	1.21
+++ gnome-packagekit.spec	11 Apr 2008 16:25:02 -0000	1.22
@@ -4,7 +4,7 @@
 Summary:   GNOME PackageKit Client
 Name:      gnome-packagekit
 Version:   %{packagekit_version}
-Release:   3%{?dist}
+Release:   4%{?dist}
 License:   GPLv2+
 Group:     Applications/System
 URL:       http://www.packagekit.org
@@ -14,6 +14,7 @@
 Source3:   new-pk-package-available24.png
 Source4:   new-pk-package-available48.png
 Source5:   new-pk-package-available.svg
+Source6:   system-install-packages
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Patch0:    gnome-packagekit-enable-kde.patch
 # handle failed restarts a little better
@@ -87,6 +88,8 @@
 install %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/gnome-packagekit/icons/hicolor/48x48/status/pk-package-available.png
 install %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/gnome-packagekit/icons/hicolor/scalable/status/pk-package-available.png
 
+install %{SOURCE6} $RPM_BUILD_ROOT%{_bindir}/system-install-packages
+
 desktop-file-install --delete-original                   \
   --dir=$RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/                    \
   $RPM_BUILD_ROOT%{_datadir}/gnome/autostart/gpk-update-icon.desktop
@@ -99,8 +102,6 @@
 
 %find_lang %name
 
-ln -s gpk-install-file $RPM_BUILD_ROOT%{_bindir}/system-install-packages
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -150,6 +151,10 @@
 %{_datadir}/applications/gpk-*.desktop
 
 %changelog
+* Thu Apr 10 2008 Owen Taylor <otaylor at redhat.com> - 0.1.11-4
+- Make system-install-packages a wrapper script not a symlink
+  so both files and package names work (#441674)
+
 * Sat Apr  9 2008 Richard Hughes  <rhughes at redhat.com> - 0.1.11-3
 - Pull in the new icons from upsteam from Mike Langlie.
 




More information about the fedora-extras-commits mailing list