+-------------------------------------------------------------------
+Fri Jan 24 10:01:35 CET 2014 - aschnell@suse.de
+
+- removed grub-snapper-plugin subpackage (fate#316232)
+
-------------------------------------------------------------------
Fri Dec 13 16:10:42 CET 2013 - aschnell@suse.de
endif
-EXTRA_DIST = snapper-hourly snapper-daily zypp-plugin.py grub-plugin.py $(pam_snapper_SCRIPTS)
+EXTRA_DIST = snapper-hourly snapper-daily zypp-plugin.py $(pam_snapper_SCRIPTS)
install-data-local:
install -D snapper-hourly $(DESTDIR)/etc/cron.hourly/suse.de-snapper
install -D snapper-daily $(DESTDIR)/etc/cron.daily/suse.de-snapper
if HAVE_ZYPP
install -D zypp-plugin.py $(DESTDIR)/usr/lib/zypp/plugins/commit/snapper.py
- install -D grub-plugin.py $(DESTDIR)/usr/lib/snapper/plugins/grub.py
endif
%doc %{_mandir}/*/snapper-zypp-plugin.8*
%doc %{_mandir}/*/snapper-zypp-plugin.conf.5*
-%package -n grub-snapper-plugin
-BuildArch: noarch
-Requires: python
-Requires: python-xattr
-Requires: snapper = %version
-%if 0%{?suse_version}
-Supplements: packageand(snapper-zypp-plugin:grub2)
-%endif
-Summary: A snapper plugin for adding snapshot metadata for grub2
-Group: System/Packages
-
-%description -n grub-snapper-plugin
-This package contains a plugin for snapper that adds metadata to snapshots
-used by grub2.
-
-Authors:
---------
- Arvin Schnell <aschnell@suse.de>
-
-%files -n grub-snapper-plugin
-%defattr(-,root,root)
-%dir /usr/lib/snapper
-%dir /usr/lib/snapper/plugins
-/usr/lib/snapper/plugins/grub.py*
-
%package -n pam_snapper
Requires: pam
Requires: snapper = %version
}
filesystem->createConfig();
+
+#if 1
+ if (subvolume == "/" && filesystem->fstype() == "btrfs" &&
+ access("/usr/lib/snapper/plugins/grub", X_OK) == 0)
+ {
+ SystemCmd cmd("/usr/lib/snapper/plugins/grub --enable");
+ }
+#endif
}
auto_ptr<Snapper> snapper(new Snapper(config_name));
+#if 1
+ if (snapper->subvolumeDir() == "/" && snapper->getFilesystem()->fstype() == "btrfs" &&
+ access("/usr/lib/snapper/plugins/grub", X_OK) == 0)
+ {
+ SystemCmd cmd("/usr/lib/snapper/plugins/grub --disable");
+ }
+#endif
+
Snapshots& snapshots = snapper->getSnapshots();
for (Snapshots::iterator it = snapshots.begin(); it != snapshots.end(); )
{
#if 1
if (snapper->subvolumeDir() == "/" && snapper->getFilesystem()->fstype() == "btrfs" &&
- snapshot.getType() == PRE && access("/usr/lib/snapper/plugins/grub.py", X_OK) == 0)
+ access("/usr/lib/snapper/plugins/grub", X_OK) == 0)
{
- map<string, string> userdata = snapshot.getUserdata();
- map<string, string>::const_iterator it = userdata.find("important");
- bool important = it != userdata.end() && it->second == "yes";
-
- SystemCmd cmd(sformat("/usr/lib/snapper/plugins/grub.py %d %s", snapshot.getNum(),
- important ? "yes" : "no"));
+ SystemCmd cmd("/usr/lib/snapper/plugins/grub --refresh");
}
#endif
snapshot->userdata = userdata;
snapshot->writeInfo();
+
+#if 1
+ if (snapper->subvolumeDir() == "/" && snapper->getFilesystem()->fstype() == "btrfs" &&
+ access("/usr/lib/snapper/plugins/grub", X_OK) == 0)
+ {
+ SystemCmd cmd("/usr/lib/snapper/plugins/grub --refresh");
+ }
+#endif
}
infos_dir.unlink(decString(snapshot->getNum()), AT_REMOVEDIR);
entries.erase(snapshot);
+
+#if 1
+ if (snapper->subvolumeDir() == "/" && snapper->getFilesystem()->fstype() == "btrfs" &&
+ access("/usr/lib/snapper/plugins/grub", X_OK) == 0)
+ {
+ SystemCmd cmd("/usr/lib/snapper/plugins/grub --refresh");
+ }
+#endif
}