Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package disomaster for openSUSE:Factory 
checked in at 2021-06-02 22:10:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/disomaster (Old)
 and      /work/SRC/openSUSE:Factory/.disomaster.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "disomaster"

Wed Jun  2 22:10:59 2021 rev:2 rq:891669 version:5.0.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/disomaster/disomaster.changes    2021-04-26 
16:40:02.122116061 +0200
+++ /work/SRC/openSUSE:Factory/.disomaster.new.1898/disomaster.changes  
2021-06-02 22:11:12.724124193 +0200
@@ -1,0 +2,6 @@
+Mon May  3 09:21:30 UTC 2021 - Hillwood Yang <[email protected]>
+
+- Update version to 5.0.7
+  * Update api 
+
+-------------------------------------------------------------------

Old:
----
  disomaster-5.0.5.tar.gz

New:
----
  disomaster-5.0.7.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ disomaster.spec ++++++
--- /var/tmp/diff_new_pack.7JFYrB/_old  2021-06-02 22:11:13.180124156 +0200
+++ /var/tmp/diff_new_pack.7JFYrB/_new  2021-06-02 22:11:13.184124155 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package disomaster
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,21 +12,22 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
+
 %define  sover  1
 
 Name:           disomaster
-Version:        5.0.5
+Version:        5.0.7
 Release:        0
-License:        GPL-3.0+
+License:        GPL-3.0-or-later
 Summary:        A libisoburn wrapper
-Url:            https://github.com/linuxdeepin/disomaster
+URL:            https://github.com/linuxdeepin/disomaster
 Group:          Hardware/Other
 Source0:        
https://github.com/linuxdeepin/disomaster/archive/%{version}/%{name}-%{version}.tar.gz
-BuildRequires:  pkgconfig(libisoburn-1)
 BuildRequires:  pkgconfig(Qt5Gui)
+BuildRequires:  pkgconfig(libisoburn-1)
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description

++++++ disomaster-5.0.5.tar.gz -> disomaster-5.0.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/disomaster-5.0.5/debian/control 
new/disomaster-5.0.7/debian/control
--- old/disomaster-5.0.5/debian/control 2020-10-12 05:58:10.000000000 +0200
+++ new/disomaster-5.0.7/debian/control 2020-12-08 04:28:44.000000000 +0100
@@ -5,7 +5,7 @@
 Build-Depends:
  debhelper (>= 9),
  pkg-config,
- qt5-default,
+ qtbase5-dev,
  qt5-qmake,
  libisoburn-dev
 Standards-Version: 3.9.8
@@ -15,9 +15,10 @@
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: libisoburn wrapper for Qt.
+ A convenient way to burn iso9660 image!
 
 Package: libdisomaster-dev
 Architecture: any
 Depends: libdisomaster, ${misc:Depends}
 Description: Development package for libdisomaster.
-
+ A convenient way to burn iso9660 image!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/disomaster-5.0.5/libdisomaster/disomaster.cpp 
new/disomaster-5.0.7/libdisomaster/disomaster.cpp
--- old/disomaster-5.0.5/libdisomaster/disomaster.cpp   2020-10-12 
05:58:10.000000000 +0200
+++ new/disomaster-5.0.7/libdisomaster/disomaster.cpp   2020-12-08 
04:28:44.000000000 +0100
@@ -21,9 +21,6 @@
 #include "disomaster.h"
 #include "xorriso.h"
 #include <QRegularExpression>
-#include <QDebug>
-#include <QThread>
-#include <QTime>
 
 #define PCHAR(s) (char*)(s)
 
@@ -50,7 +47,6 @@
     DISOMasterPrivate(DISOMaster *q): q_ptr(q) {}
     XorrisO *xorriso;
     QHash<QUrl, QUrl> files;
-    QStringList discFiles;
     QHash<QString, DeviceProperty> dev;
     QStringList xorrisomsg;
     QString curdev;
@@ -58,18 +54,7 @@
     DISOMaster *q_ptr;
     Q_DECLARE_PUBLIC(DISOMaster)
 
-    QString prefixPath;
-    QStringList lstDirs;
-    QStringList shouldRenamedFiles;
-    QTime lastRecvMsgTime;
-
     void getCurrentDeviceProperty();
-    /**
-     * @brief parseFilePathByMsg??????????????? ls???cd 
???????????????????????????????????? ls ??????????????????
-     * @param msg
-     * @return ??????false???????????????????????????
-     */
-    bool parseFilePathByMsg(int type, QString msg);
 
 public:
     void messageReceived(int type, char *text);
@@ -288,6 +273,61 @@
 }
 
 /*!
+ * \brief DISOMaster::commit  Burn all staged files to the disc.
+ * \param opts   burning options
+ * \param speed  desired writing speed in kilobytes per second
+ * \param volId  volume name of the disc
+ * \return       true on success, false on failure
+ */
+bool DISOMaster::commit(const BurnOptions &opts, int speed/* = 0*/, QString 
volId/* = "ISOIMAGE"*/)
+{
+    Q_D(DISOMaster);
+    Q_EMIT jobStatusChanged(JobStatus::Stalled, 0);
+    d->xorrisomsg.clear();
+
+    QString spd = QString::number(speed) + "k";
+    if (speed == 0) {
+        spd = "0";
+    }
+
+    int r;
+
+    XORRISO_OPT(speed, d->xorriso, spd.toUtf8().data(), 0);
+    JOBFAILED_IF(r, d->xorriso);
+
+    XORRISO_OPT(volid, d->xorriso, volId.toUtf8().data(), 0);
+    JOBFAILED_IF(r, d->xorriso);
+
+    XORRISO_OPT(overwrite, d->xorriso, PCHAR("off"), 0);
+    JOBFAILED_IF(r, d->xorriso);
+
+    XORRISO_OPT(joliet, d->xorriso, PCHAR(opts.testFlag(JolietSupport) ? "on" 
: "off"), 0);
+    JOBFAILED_IF(r, d->xorriso);
+
+    XORRISO_OPT(rockridge, d->xorriso, PCHAR(opts.testFlag(RockRidgeSupport) ? 
"on" : "off"), 0);
+    JOBFAILED_IF(r, d->xorriso);
+
+    for (auto it = d->files.begin(); it != d->files.end(); ++it) {
+        XORRISO_OPT(
+            map, d->xorriso,
+            it.key().toString().toUtf8().data(),
+            it.value().toString().toUtf8().data(),
+            0
+        );
+        JOBFAILED_IF(r, d->xorriso);
+    }
+
+    XORRISO_OPT(close, d->xorriso, PCHAR(opts.testFlag(KeepAppendable) ? "off" 
: "on"), 0);
+    JOBFAILED_IF(r, d->xorriso);
+
+    XORRISO_OPT(commit, d->xorriso, 0);
+    JOBFAILED_IF(r, d->xorriso);
+
+    return true;
+}
+
+
+/*!
  * \brief Burn all staged files to the disc.
  * \param speed desired writing speed in kilobytes per second
  * \param closeSession if true, closes the session after files are burned
@@ -325,26 +365,6 @@
     XORRISO_OPT(rockridge, d->xorriso, PCHAR("on"), 0);
     JOBFAILED_IF(r, d->xorriso);
 
-    // ???????????????????????????????????????????????? ;1 ???????????????
-    Xorriso_option_stdio_sync(d->xorriso, PCHAR("end"), 0);
-    int idx = 0;
-    int argc = 1;
-    char *argv[] = {"."};
-    XORRISO_OPT(lsi, d->xorriso, argc, argv, &idx, 1);
-    XORRISO_OPT(cdi, d->xorriso, PCHAR("/"), 0);
-    d->lastRecvMsgTime.start();
-    while (d->lastRecvMsgTime.elapsed() < 3000) {
-        QThread::msleep(100);
-    }
-    XORRISO_OPT(cdi, d->xorriso, PCHAR("/"), 0);
-
-    // ??????????????? ;1 ??????
-    for (int i = 0; i < d->shouldRenamedFiles.count(); i++) {
-        QString src = d->shouldRenamedFiles[i];
-        QString desc = d->shouldRenamedFiles[i].remove(";1");
-        XORRISO_OPT(move, d->xorriso, src.toUtf8().data(), 
desc.toUtf8().data(), 0);
-    }
-
     for (auto it = d->files.begin(); it != d->files.end(); ++it) {
         XORRISO_OPT(
             map, d->xorriso,
@@ -573,71 +593,13 @@
     Xorriso_sieve_clear_results(xorriso, 0);
 }
 
-bool DISOMasterPrivate::parseFilePathByMsg(int type, QString msg)
-{
-    static const QRegularExpression lsOutputs("\'(.*)\'");
-    static const QRegularExpression cdOutputs("\'(.*)\'/");
-    static bool isLastMsgFromCdCmd = false;
-
-    int r;
-
-    if (type == 1) // ????????? type == 0 ??? result ??????
-        return false;
-
-    if (msg.endsWith("\n"))
-        msg.chop(1);
-
-    if ((msg.startsWith("-") || msg.startsWith("d") || msg.startsWith("l")) // 
??? -???????????? ??? d?????????????????? ??????????????? l
-            && msg.endsWith("'")) { // ??? ' ??????
-//        qDebug() << __LINE__ << msg;
-        QRegularExpressionMatch match = lsOutputs.match(msg);
-        if (match.hasMatch()) {
-            QString name = match.captured(0);
-            name = name.mid(1, name.length() - 2); // ??????????????? '
-            if (msg.startsWith("d")) {
-                lstDirs << (prefixPath.isEmpty() ? (name) : (prefixPath + "/" 
+ name));
-            } else if ((msg.startsWith("-") || msg.startsWith("l")) && 
name.endsWith(";1")) {
-                shouldRenamedFiles << (prefixPath.isEmpty() ? (name) : 
(prefixPath + "/" + name));
-            }
-            isLastMsgFromCdCmd = false;
-            lastRecvMsgTime.restart();
-            return true;
-        }
-    }
-
-    QRegularExpressionMatch cdMatch = cdOutputs.match(msg);
-    if (cdMatch.hasMatch()) {
-        if (!isLastMsgFromCdCmd) {
-            for (int i = lstDirs.count() - 1; i >= 0; i--) {
-                const QString &dir = lstDirs[i];
-                char *argv[] = {};
-                int idx = 0;
-                XORRISO_OPT(cdi, xorriso, dir.toUtf8().data(), 0); // 
?????????????????????????????????????????????????????????
-                XORRISO_OPT(lsi, xorriso, 0, argv, &idx, 1);
-                XORRISO_OPT(cdi, xorriso, PCHAR("../"), 0);
-                lstDirs.removeAt(i);
-            }
-        }
-
-        prefixPath = cdMatch.captured(0);
-        prefixPath = prefixPath.mid(1, prefixPath.length() - 3); // 
??????????????? ' ??? '/
-//        qDebug() << "cd: =======================================>" << 
prefixPath;
-        isLastMsgFromCdCmd = true;
-        lastRecvMsgTime.restart();
-        return true;
-    }
-    return false;
-}
-
 void DISOMasterPrivate::messageReceived(int type, char *text)
 {
     Q_Q(DISOMaster);
+    Q_UNUSED(type);
     QString msg(text);
     msg = msg.trimmed();
 
-    if (parseFilePathByMsg(type, text))
-        return;
-
     fprintf(stderr, "msg from xorriso (%s) : %s\n", type ? " info " : 
"result", msg.toStdString().c_str());
     xorrisomsg.push_back(msg);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/disomaster-5.0.5/libdisomaster/disomaster.h 
new/disomaster-5.0.7/libdisomaster/disomaster.h
--- old/disomaster-5.0.5/libdisomaster/disomaster.h     2020-10-12 
05:58:10.000000000 +0200
+++ new/disomaster-5.0.7/libdisomaster/disomaster.h     2020-12-08 
04:28:44.000000000 +0100
@@ -46,6 +46,18 @@
     BD_RE
 };
 
+enum BurnOption
+{
+    KeepAppendable = 1,
+    VerifyDatas = 1 << 1,
+    EjectDisc = 1 << 2,             // not used yet.
+    ISO9660Only = 1 << 3,           // default
+    JolietSupport = 1 << 4,         // add joliet extension
+    RockRidgeSupport = 1 << 5,      // add rockridge extension
+    JolietAndRockRidge = 1 << 6,    // add both of them, not used yet
+};
+Q_DECLARE_FLAGS(BurnOptions, BurnOption)
+
 struct DeviceProperty
 {
     /** \brief True when the media in device is blank or false otherwise.*/
@@ -98,7 +110,8 @@
     void stageFiles(const QHash<QUrl, QUrl> filelist);
     const QHash<QUrl, QUrl> &stagingFiles() const;
     void removeStagingFiles(const QList<QUrl> filelist);
-    bool commit(int speed = 0, bool closeSession = false, QString volId = 
"ISOIMAGE");
+    bool commit(const BurnOptions &opts, int speed = 0, QString volId = 
"ISOIMAGE");
+    Q_DECL_DEPRECATED_X("Suggest use commit with BurnOptions instead") bool 
commit(int speed = 0, bool closeSession = false, QString volId = "ISOIMAGE");
     bool erase();
     bool checkmedia(double *qgood, double *qslow, double *qbad);
 

Reply via email to