[ark] 4.9.97-2
Rex Dieter
rdieter at fedoraproject.org
Sat Jan 5 19:33:37 UTC 2013
commit 1a425c6fea8f734551aa5053f47299336c766c6d
Author: Rex Dieter <rdieter at math.unl.edu>
Date: Sat Jan 5 13:34:03 2013 -0600
4.9.97-2
- Ark needs to know about application/x-source-rpm (#885316)
- Improve subfolder autodetection (kde review 107634)
- Don't delete the KPart in the MainWindow destructor (kde review 107635)
ark-4.9.97-improve_subfolder_autodetection.patch | 80 ++++++++++++++++++++++
ark-4.9.97-r107635.patch | 11 +++
ark-4.9.97-x-source-rpm.patch | 12 +++
ark.spec | 18 ++++-
4 files changed, 119 insertions(+), 2 deletions(-)
---
diff --git a/ark-4.9.97-improve_subfolder_autodetection.patch b/ark-4.9.97-improve_subfolder_autodetection.patch
new file mode 100644
index 0000000..e0e3365
--- /dev/null
+++ b/ark-4.9.97-improve_subfolder_autodetection.patch
@@ -0,0 +1,80 @@
+diff --git a/kerfuffle/jobs.cpp b/kerfuffle/jobs.cpp
+index aedc62c4c9902c4f3207c648747f2e427446d5e5..de16439ce46283956e7741662bda19d1e8e591fa 100644
+--- a/kerfuffle/jobs.cpp
++++ b/kerfuffle/jobs.cpp
+@@ -217,7 +217,8 @@ void ListJob::onNewEntry(const ArchiveEntry& entry)
+ m_isPasswordProtected |= entry [ IsPasswordProtected ].toBool();
+
+ if (m_isSingleFolderArchive) {
+- const QString fileName(entry[FileName].toString());
++ const QString fileName(entry[FileName].toString()
++ .replace(QRegExp(QString::fromAscii("^\\./")), QString()));
+ const QString basePath(fileName.split(QLatin1Char( '/' )).at(0));
+
+ if (m_basePath.isEmpty()) {
+diff --git a/kerfuffle/archive.cpp b/kerfuffle/archive.cpp
+index c2c5b18528def63405a8703475b1c592ca945973..470fc56879a2d5e579389b69591da9f230af74ea 100644
+--- a/kerfuffle/archive.cpp
++++ b/kerfuffle/archive.cpp
+@@ -196,6 +196,16 @@ QString Archive::fileName() const
+ return m_iface->filename();
+ }
+
++QString Archive::fileBaseName() const
++{
++ QString base = QFileInfo(m_iface->filename()).completeBaseName();
++ //special case for tar.gz/bzip2 files
++ if (base.right(4).toUpper() == QLatin1String(".TAR")) {
++ base.chop(4);
++ }
++ return base;
++}
++
+ void Archive::onAddFinished(KJob* job)
+ {
+ //if the archive was previously a single folder archive and an add job
+@@ -217,15 +227,7 @@ void Archive::onListFinished(KJob* job)
+ m_isPasswordProtected = ljob->isPasswordProtected();
+ m_subfolderName = ljob->subfolderName();
+ if (m_subfolderName.isEmpty()) {
+- QFileInfo fi(fileName());
+- QString base = fi.completeBaseName();
+-
+- //special case for tar.gz/bzip2 files
+- if (base.right(4).toUpper() == QLatin1String(".TAR")) {
+- base.chop(4);
+- }
+-
+- m_subfolderName = base;
++ m_subfolderName = fileBaseName();
+ }
+
+ m_hasBeenListed = true;
+diff --git a/kerfuffle/archive.h b/kerfuffle/archive.h
+index 515788f978c1d29146c25dcb57a9dad2d46371f7..38049f2c949eb2ab804fc61f9da9336e6e848b77 100644
+--- a/kerfuffle/archive.h
++++ b/kerfuffle/archive.h
+@@ -95,6 +95,7 @@ public:
+ ~Archive();
+
+ QString fileName() const;
++ QString fileBaseName() const;
+ bool isReadOnly() const;
+
+ KJob* open();
+diff --git a/app/batchextract.cpp b/app/batchextract.cpp
+index 9e466350568384247e99362745205c417b27873f..d20d105621ef49506a195a56cf5e26184192d03d 100644
+--- a/app/batchextract.cpp
++++ b/app/batchextract.cpp
+@@ -68,9 +68,9 @@ void BatchExtract::addExtraction(Kerfuffle::Archive* archive)
+ {
+ QString destination = destinationFolder();
+
+- if ((autoSubfolder()) && (!archive->isSingleFolderArchive())) {
++ if ((autoSubfolder()) && (!archive->isSingleFolderArchive() || archive->subfolderName() != archive->fileBaseName())) {
+ const QDir d(destination);
+- QString subfolderName = archive->subfolderName();
++ QString subfolderName = archive->fileBaseName();
+
+ if (d.exists(subfolderName)) {
+ subfolderName = KIO::RenameDialog::suggestName(destination, subfolderName);
diff --git a/ark-4.9.97-r107635.patch b/ark-4.9.97-r107635.patch
new file mode 100644
index 0000000..c958399
--- /dev/null
+++ b/ark-4.9.97-r107635.patch
@@ -0,0 +1,11 @@
+diff -up ark-4.9.97/app/mainwindow.cpp.r107635 ark-4.9.97/app/mainwindow.cpp
+--- ark-4.9.97/app/mainwindow.cpp.r107635 2012-12-17 09:07:06.000000000 -0600
++++ ark-4.9.97/app/mainwindow.cpp 2013-01-05 13:17:50.206588420 -0600
+@@ -69,7 +69,6 @@ MainWindow::~MainWindow()
+ if (m_recentFilesAction) {
+ m_recentFilesAction->saveEntries(KGlobal::config()->group("Recent Files"));
+ }
+- delete m_part;
+ m_part = 0;
+ }
+
diff --git a/ark-4.9.97-x-source-rpm.patch b/ark-4.9.97-x-source-rpm.patch
new file mode 100644
index 0000000..4cf8b6e
--- /dev/null
+++ b/ark-4.9.97-x-source-rpm.patch
@@ -0,0 +1,12 @@
+diff -up ark-4.9.97/plugins/libarchive/CMakeLists.txt.x-source-rpm ark-4.9.97/plugins/libarchive/CMakeLists.txt
+--- ark-4.9.97/plugins/libarchive/CMakeLists.txt.x-source-rpm 2012-12-17 09:07:06.000000000 -0600
++++ ark-4.9.97/plugins/libarchive/CMakeLists.txt 2013-01-05 13:12:05.226847187 -0600
+@@ -4,7 +4,7 @@ include_directories(${LIBARCHIVE_INCLUDE
+ set(SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES "application/x-deb;application/x-cd-image;application/x-bcpio;application/x-cpio;application/x-cpio-compressed;application/x-sv4cpio;application/x-sv4crc;")
+ set(SUPPORTED_LIBARCHIVE_READWRITE_MIMETYPES "application/x-tar;application/x-compressed-tar;application/x-bzip-compressed-tar;application/x-tarz;application/x-xz-compressed-tar;application/x-lzma-compressed-tar;")
+ if(HAVE_LIBARCHIVE_RPM_SUPPORT)
+- set(SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES "${SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES}application/x-rpm;")
++ set(SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES "${SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES}application/x-rpm;application/x-source-rpm;")
+ endif(HAVE_LIBARCHIVE_RPM_SUPPORT)
+ if(HAVE_LIBARCHIVE_CAB_SUPPORT)
+ set(SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES "${SUPPORTED_LIBARCHIVE_READONLY_MIMETYPES}application/vnd.ms-cab-compressed;")
diff --git a/ark.spec b/ark.spec
index 7ce61c4..516c7e2 100644
--- a/ark.spec
+++ b/ark.spec
@@ -1,7 +1,7 @@
Name: ark
Summary: Archive manager
Version: 4.9.97
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
URL: http://utils.kde.org/projects/ark
@@ -16,6 +16,12 @@ Source0: http://download.kde.org/%{stable}/%{version}/src/%{name}-%{version}.tar
## upstreamable patches
# libkerfuffle namelink_skip
Patch50: ark-4.7.80-namelink_skip.patch
+# https://bugzilla.redhat.com/885316
+Patch51: ark-4.9.97-x-source-rpm.patch
+# https://git.reviewboard.kde.org/r/107635/
+Patch52: ark-4.9.97-r107635.patch
+# https://git.reviewboard.kde.org/r/107634/
+Patch53: ark-4.9.97-improve_subfolder_autodetection.patch
## upstream patches
@@ -38,7 +44,7 @@ Obsoletes: kdeutils-ark < 6:4.7.80
Provides: kdeutils-ark = 6:%{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
-Requires: kdebase-runtime%{?_kde4_version: >= %{_kde4_version}}
+Requires: kde-runtime%{?_kde4_version: >= %{_kde4_version}}
Requires: p7zip-plugins
%description
@@ -63,6 +69,9 @@ Provides: kdeutils-ark-libs = 6:%{version}-%{release}
%setup -q -n %{name}-%{version}
%patch50 -p1 -b .namelink_skip
+%patch51 -p1 -b .x-source-rpm
+%patch52 -p1 -b .r107635
+%patch53 -p1 -b .improve_subfolder_autodetection
%build
@@ -122,6 +131,11 @@ fi
%changelog
+* Sat Jan 05 2013 Rex Dieter <rdieter at fedoraproject.org> - 4.9.97-2
+- Ark needs to know about application/x-source-rpm (#885316)
+- Improve subfolder autodetection (kde review 107634)
+- Don't delete the KPart in the MainWindow destructor (kde review 107635)
+
* Fri Jan 04 2013 Rex Dieter <rdieter at fedoraproject.org> - 4.9.97-1
- 4.9.97
More information about the scm-commits
mailing list