After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 687601 - uninstall: support automatically created modules
uninstall: support automatically created modules
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2012-11-05 00:41 UTC by Diego Escalante Urrelo (not reading bugmail)
Modified: 2013-04-01 00:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
uninstall: support automatically created modules (2.51 KB, patch)
2012-11-05 00:41 UTC, Diego Escalante Urrelo (not reading bugmail)
needs-work Details | Review
uninstall: support automatically created modules (2.76 KB, patch)
2013-01-04 21:40 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review

Description Diego Escalante Urrelo (not reading bugmail) 2012-11-05 00:41:24 UTC
jhbuild buildone supports on-the-fly module creation, once installed
these modules can not be removed because jhbuild uninstall does not
support on-the-fly creation.

Fix this copying the solution in buildone.

This should be completely safe and inocuous. On-the-fly modules behave
just like regular moduleset ones: their manifest is used if it exists,
and their registry is taken care of in the packagedb.
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2012-11-05 00:41:29 UTC
Created attachment 228063 [details] [review]
uninstall: support automatically created modules

"jhbuild buildone" creates automatic modules for arguments that are not
declared modules in the moduleset.

Once installed, these can not be uninstalled because "jhbuild uninstall"
demands modules to in the moduleset file, even when manifest files are
available for the automatically created ones.

Fix uninstall to support on-the-fly creation of modules. This works just
like with moduleset modules.
Comment 2 Diego Escalante Urrelo (not reading bugmail) 2012-12-06 16:11:30 UTC
Ping
Comment 3 Craig Keogh 2012-12-06 21:48:45 UTC
Thank you for the patch. Unreviewed patches aren't fun - I'll review soon.
Comment 4 Craig Keogh 2012-12-14 01:54:15 UTC
Sorry. I haven't forgotten. A busy time of year.
Comment 5 Diego Escalante Urrelo (not reading bugmail) 2012-12-14 12:21:29 UTC
Thanks for the comment Craig, no worries! :-)
Comment 6 Craig Keogh 2012-12-28 07:35:21 UTC
Review of attachment 228063 [details] [review]:

Thank you for the patch, and I'm sorry for the delay.
If I attempted to uninstall a package that isn't installed I get:

# jhbuild uninstall dsadsadasdasd
I: module "dsadsadasdasd" does not exist, created automatically using repository "git.gnome.org"
W: Module 'dsadsadasdasd' is not installed

I should only get:
# jhbuild uninstall dsadsadasdasd
W: Module 'dsadsadasdasd' is not installed

Otherwise the patch works well.

::: jhbuild/commands/uninstall.py
@@ +46,3 @@
+            except KeyError:
+                if not default_repo:
+                    raise FatalError(_('unknown module %s and no default repository to create automatic module') % modname)

This message is misleading. We are uninstalling here, not creating.
Comment 7 Diego Escalante Urrelo (not reading bugmail) 2013-01-04 21:40:22 UTC
Created attachment 232790 [details] [review]
uninstall: support automatically created modules

"jhbuild buildone" creates automatic modules for arguments that are not
declared modules in the moduleset.

Once installed, these can not be uninstalled because "jhbuild uninstall"
demands modules to in the moduleset file, even when manifest files are
available for the automatically created ones.

Fix uninstall to support on-the-fly creation of modules. This works just
like with moduleset modules.
Comment 8 Craig Keogh 2013-04-01 00:35:07 UTC
Comment on attachment 232790 [details] [review]
uninstall: support automatically created modules


Thank you for the patch. Committed. Sorry for the delay.
https://git.gnome.org/browse/jhbuild/commit/?id=b27cebe88efb5347ce5744765650fc4eec35f46d